<?php

namespace App\Providers;

use Yongao\Cmp\Sdk\O1\Api;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('cmp',function(){
            $config = config('cmp');
            $config['locale'] = config('app.locale');//'zh-CN';//config('app.locale');
            return new Api($config);
        });
    }
}
